//File BlW32Main.h
//------------------------------------------------

#if !defined(_BEAUTIFULLOVER_W32_MAIN_)
#define _BEAUTIFULLOVER_W32_MAIN_

#include "stdio.h"
#include "../common/inc/BlAPI.h"  //( V0.1.0.2 )

#define    	MY_VERSION		"V(0.1.0.5)"

class CMyDll
{
public:
	CMyDll(){}
	~CMyDll(){}
	BLSTATUS OnBlCallLibFun()
	{
		BLSTATUS r = prCallLibFun();
		return r;
	}
private:
	BLSTATUS pvCallLibFun(char *szLib,char *szFun)
	{
		BLSTATUS r = BL_STATUS_NOT_SUPPORT_INTERFACE;
		HMODULE h = LoadLibrary(szLib);
		
		if(NULL != h)
		{
			FARPROC pFunc = GetProcAddress(h, szFun);
			if (pFunc ) {
				char sz[155];
				sprintf(sz,"BlW32Main %s",MY_VERSION);
				r = (* (OnBLAPI *)pFunc)(NULL,0,0,(LPARAM)sz);  
				FreeLibrary (h);
			}
		}
		else
		{
			r = BL_STATUS_NOT_FOUND_LIBARY;
		}
		return r;
	}
	BLSTATUS prCallLibFun()
	{
		BLSTATUS r = BL_STATUS_NOT_SUPPORT_INTERFACE;
		r = pvCallLibFun("BlMfcUI.dll","OnBlApi");
		return r;
	} 
};
//================================================
#endif // _BEAUTIFULLOVER_W32_MAIN_